package com.zheng.study.web.shiro.realm;

import org.apache.shiro.authc.AuthenticationToken;

import java.util.Map;

/**
 * newFile
 * ============================================================================
 * author : Zhang Kaitao
 * createDate:  14-2-26
 * ============================================================================
 */
public class StatelessToken implements AuthenticationToken {
	private static final long serialVersionUID = 7404110610626006860L;

	private String username;
	private Map<String, ?> params;
	private String clientDigest;

	public StatelessToken(String username, Map<String, ?> params, String clientDigest) {
		this.username = username;
		this.params = params;
		this.clientDigest = clientDigest;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Map<String, ?> getParams() {
		return params;
	}

	public void setParams(Map<String, ?> params) {
		this.params = params;
	}

	public String getClientDigest() {
		return clientDigest;
	}

	public void setClientDigest(String clientDigest) {
		this.clientDigest = clientDigest;
	}

	public Object getPrincipal() {
		return username;
	}

	public Object getCredentials() {
		return clientDigest;
	}
}
